package service;

import dao.TaskDao;
import essenceClasses.Task;
import interfaceService.ITaskService;

import java.sql.SQLException;
import java.util.Date;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: user
 * Date: 01.06.14
 * Time: 12:20
 * To change this template use File | Settings | File Templates.
 */
public class TaskService implements ITaskService {
    TaskDao taskDao = null;

    public TaskService() {
        taskDao = new TaskDao();
    }

    @Override
    public List<Task> getAllTasks() throws SQLException {

        return taskDao.getAllTasks();
    }

    @Override
    public boolean addTask(String title, String description, int priority, java.sql.Date createDate, java.sql.Date startDate, java.sql.Date endDate) throws SQLException {
        return taskDao.addTask(title, description, priority, createDate, startDate, endDate);  //To change body of implemented methods use File | Settings | File Templates.
    }
}
